const { CloudFunction } = getApp();
// let data = require("../../privacy.json")
Page({
  data: {
    dataArray: null,
    loadingActive: false
  },
  onLoad() {
    my.hideShareMenu({
      success() {
      },
      fail() {
      },
    });
    // this.setData({
    //   dataArray:data.dataArray
    // })
    this.queryJson()
  },
  async queryJson() {
    this.setData({
      loadingActive: true
    })
    let res = await CloudFunction('getByType', { type: 2 });
        console.log(decodeURI(res.data.arr[0].json))
    this.setData({
      loadingActive: false
    })
    let data = JSON.parse(decodeURI(res.data.arr[0].json))
    this.setData({
      dataArray: data.dataArray
    })
  }
});
